using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Example.Business;

namespace www
{
    public partial class Search_Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        protected void CountryButton_Click(object sender, EventArgs e)
        {
            Response.Redirect("~/Search/ByCountry.aspx?c=" + CountryDropDown.SelectedValue);
        }
        protected void StyleButton_Click(object sender, EventArgs e)
        {
            Response.Redirect("~/Search/ByStyle.aspx?s=" + StyleDropDown.SelectedValue);
        }
        protected void AvailabilityButton_Click(object sender, EventArgs e)
        {
            Response.Redirect("~/Search/ByAvailability.aspx?a=" + AvailabilityDropDown.SelectedValue);
        }
        protected void CountryDataSource_Select(object sender, NBusiness.Data.Web.SelectEntityEventArgs e)
        {
            e.Entities = CachedCountryCollection.FetchAll();
        }
        protected void StyleDataSource_Select(object sender, NBusiness.Data.Web.SelectEntityEventArgs e)
        {
            e.Entities = CachedBeerStyleCollection.FetchAll();
        }
        protected void AvailabilityDataSource_Select(object sender, NBusiness.Data.Web.SelectEntityEventArgs e)
        {
            e.Entities = CachedAvailabilityCollection.FetchAll();
        }
    }
}